
NULL =

MINIMIZE = ../min.opt

SOURCES = \
  pick.con \
  pick1.con \
  flow.con \
  distributivity1.con \
  $(NULL)

OBJECTS = \
  $(SOURCES:%.con=%.A.ps) \
  $(SOURCES:%.con=%.B.ps) \
  $(NULL)

all: $(OBJECTS)

%.A.dot %.B.dot %.C.dot: %.con $(MINIMIZE)
	$(MINIMIZE) --reduce $<

%.tex: %.dot
	dot -Txdot $< | dot2tex -c -ftikz --tikzedgelabels --styleonly >$@

%.png: %.dot
	dot -Tpng $< >$@

%.dvi: %.tex
	latex $<

%.ps: %.dvi
	dvips $<

.PHONY: clean dep
clean:
	rm -f *.ps *.dot *.aux *.log *.dvi *.tex

